import { RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/thing",
    name: "index",
    component: () => import("@/layout/index.vue"),
    meta: {
      title: "首页",
      isKeepAlive: false,
    },
    children: [
      {
        path: "index",
        name: "index",
        component: () => import("@/views/index/index.vue"),
        meta: {
          title: "首页",
          isKeepAlive: true,
        },
      },
      {
        path: "public",
        name: "public",
        component: () => import("@/views/public/index.vue"),
        meta: {
          title: "发布",
          isKeepAlive: false,
        },
      },
      {
        path: "detail/:id",
        name: "detail",
        component: () => import("@/views/detail/index.vue"),
        meta: {
          title: "详情",
          isKeepAlive: true,
        },
      },
      {
        path: "home",
        name: "home",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "我的",
          isKeepAlive: true,
        },
      },
      {
        path: "feedback",
        name: "feedback",
        component: () => import("@/views/feedback/index.vue"),
        meta: {
          title: "反馈",
          isKeepAlive: false,
        },
      },
    ],
  },
];

export default routes;
